package is.progetto1.test.main;

import java.io.IOException;

import is.progetto1.aritmeticExpression.Expression;
import is.progetto1.aritmeticExpression.Visitor;
import is.progetto1.aritmeticExpression.builder.ExpressionBuilderIF;
import is.progetto1.aritmeticExpression.builder.InputManagerIF;
import is.progetto1.aritmeticExpression.builder.impl.Director;
import is.progetto1.aritmeticExpression.builder.impl.ExpressionBuilder;
import is.progetto1.aritmeticExpression.builder.impl.InputManager;

public class DirectorTestMain {

	public static void main(String[] args) throws IOException {
		String ex="((a + 1) + 3)";
		InputManagerIF im=new InputManager(ex);
		ExpressionBuilderIF eb=new ExpressionBuilder();
		Director d=new Director(im, eb);
		Expression e=d.costruct();
		Visitor v=new Visitor();
		System.out.println(v.visitPostfix(e));
		System.out.println(e);
	}

}
